package com.vst.orm.dao.hibernate;

import java.io.Serializable;
import java.util.List;

import com.vst.orm.search.ExampleOptions;
import com.vst.orm.search.Filter;
import com.vst.orm.search.ISearch;
import com.vst.orm.search.SearchResult;

public abstract interface GenericDAO<T, ID extends Serializable> {
	public abstract T find(ID paramID);

	public abstract T[] find(ID... paramVarArgs);

	public abstract T getReference(ID paramID);

	public abstract T[] getReferences(ID... paramVarArgs);

	public abstract boolean save(T paramT);

	public abstract boolean[] save(T... paramVarArgs);

	public abstract boolean remove(T paramT);

	public abstract void remove(T... paramVarArgs);

	public abstract boolean removeById(ID paramID);

	public abstract void removeByIds(ID... paramVarArgs);

	public abstract List<T> findAll();

	public abstract <RT> List<RT> search(ISearch paramISearch);

	public abstract <RT> RT searchUnique(ISearch paramISearch);

	public abstract int count(ISearch paramISearch);

	public abstract <RT> SearchResult<RT> searchAndCount(ISearch paramISearch);

	public abstract boolean isAttached(T paramT);

	public abstract void refresh(T... paramVarArgs);

	public abstract void flush();

	public abstract Filter getFilterFromExample(T paramT);

	public abstract Filter getFilterFromExample(T paramT, ExampleOptions paramExampleOptions);
}
